--- START OF DIRECTIONS FOR AI ---

Hello AI.

This file is a complete manifest of a modern Android application project. Your task is to act as an expert Android developer, and find why it crashes when the APK is run after being installed and provide the definitive solution to get the APK to fully run.

**Project Goal:**
A high-performance "Intention Repeater" app built with Kotlin, Jetpack Compose, MVVM architecture, and a Room database. It uses a Foreground Service to run reliably in the background.

**Current Status:**
The project is 99.9% complete. We have successfully configured the build environment, Gradle scripts, signing keys, and resources. However, we are stuck on a persistent crash when running the app after installing the APK.

**Your Task:**
1. Update my source code for error logging with timestamps to a intention_repeater_logfile.txt in an easy to get to place, and let me know where that will be stored on the phone.
2. It should run on a variety of Android phones. I want the min API while meeting Google's requirement and allowing full functionality.
3. Go through all the code and optimize for best practices, efficiency, UI/UX, memory management so it doesn't crash due to memory errors.
4. Thoroughly review all the source code files provided in this manifest.
5. Provide the final, corrected version of ANY file(s) that need to be changed into master_patch.txt.
6. Provide the exact, final sequence of commands to run from the command line to achieve a successful build of both the release APK and the AAB.
7. Put all changes into a master_patch.txt
8. Create a Python script master_patcher.py that applies the patch to the subfolders from the current folder.
9. Do away with Intention Multiplying (uses huge RAM) and replace with a burst option for the non-maximum speeds. This will fix memory errors.
    a. Burst option is an inner loop between each regular iteration. Default to 888888 times assigning the intention they gave to the intention variable.
    b. The burst number will be added to the iterations and the frequency for each iteration.
10. Program will now be v3.0 and build "70".

All that 1-10 code changes will go into two files you will produce:
1. master_patch.txt - Has all the changes made to files. Patch details.
2. master_patcher.py - The patcher that applies master_patch.txt to the project files.

Assume the build environment (JDK, Android SDK) is correctly set up. The problem lies within the code provided below.

--- END OF DIRECTIONS FOR AI ---

--- FILE: apply_patch.py ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: build.gradle.kts ---
--- CONTENT ---
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// All plugin definitions and repositories have been moved to settings.gradle.kts,
// which is the modern Gradle standard. This file can be mostly empty.
plugins {
    alias(libs.plugins.androidApplication) apply false
    alias(libs.plugins.jetbrainsKotlinAndroid) apply false
    alias(libs.plugins.ksp) apply false
}
--- END CONTENT ---
--- END FILE ---

--- FILE: create_manifest.py ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: gradle-trace.log ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: gradle.properties ---
--- CONTENT ---
# This flag is the direct fix for your build error.
# It enables the modern AndroidX library suite.
android.useAndroidX=true

# This flag enables a modern optimization that speeds up builds
# by making each module's resource class (R class) smaller.
android.nonTransitiveRClass=true

# This silences the warning about using an unsupported compileSdk.
# It's safe to use as we are on a very recent AGP version.
android.suppressUnsupportedCompileSdk=35

# These settings improve build performance by allocating more memory
# to the Gradle build process and enabling caching.
org.gradle.jvmargs=-Xmx2048m -Dkotlin.daemon.jvm.options="-Xmx1536m"
org.gradle.caching=true
--- END CONTENT ---
--- END FILE ---

--- FILE: gradlew ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: gradlew.bat ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: master_patch.txt ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: project_manifest.txt.bak ---
[Other Non-Code File - Path Only]
--- END FILE ---

--- FILE: settings.gradle.kts ---
--- CONTENT ---
// This block configures where Gradle looks for plugins.
// It's the most important part of the fix.
pluginManagement {
    repositories {
        google() // Tells Gradle to search Google's Maven repository for plugins.
        mavenCentral()
        gradlePluginPortal()
    }
}

// This block configures where Gradle looks for project dependencies (libraries).
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google() // Also needed for libraries.
        mavenCentral()
    }
}

// Sets the name of the root project.
rootProject.name = "IntentionRepeaterV3"
// Includes the 'app' folder as a module in the project.
include(":app")
--- END CONTENT ---
--- END FILE ---

--- FILE: app/build.gradle.kts ---
--- CONTENT ---
import java.util.Properties
import java.io.FileInputStream

plugins {
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.jetbrainsKotlinAndroid)
    alias(libs.plugins.ksp)
}

// Read keystore properties
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
    keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}

android {
    namespace = "com.anthroteacher.intentionrepeater"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.anthroteacher.intentionrepeater"
        minSdk = 24
        targetSdk = 35
        versionCode = 70
        versionName = "3.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    signingConfigs {
        create("release") {
            if (keystorePropertiesFile.exists()) {
                keyAlias = keystoreProperties["keyAlias"] as String
                keyPassword = keystoreProperties["keyPassword"] as String
                storeFile = file(keystoreProperties["storeFile"] as String)
                storePassword = keystoreProperties["storePassword"] as String
            }
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
            signingConfig = signingConfigs.getByName("release")
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.8"
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
}

dependencies {
    implementation(libs.androidx.core.ktx)
    implementation(libs.androidx.lifecycle.runtime.ktx)
    implementation(libs.androidx.lifecycle.runtime.compose)
    implementation(libs.androidx.activity.compose)
    implementation(platform(libs.androidx.compose.bom))
    implementation(libs.androidx.ui)
    implementation(libs.androidx.ui.graphics)
    implementation(libs.androidx.ui.tooling.preview)
    implementation(libs.androidx.material3)
    implementation(libs.androidx.material.icons.extended)
    implementation(libs.androidx.lifecycle.viewmodel.compose)
    implementation(libs.bouncycastle.provider)

    // Room Database
    implementation(libs.androidx.room.runtime)
    implementation(libs.androidx.room.ktx)
    ksp(libs.androidx.room.compiler)

    // Testing
    testImplementation(libs.junit)
    androidTestImplementation(libs.androidx.test.ext.junit)
    androidTestImplementation(libs.androidx.espresso.core)
    androidTestImplementation(platform(libs.androidx.compose.bom))
    androidTestImplementation(libs.androidx.ui.test.junit4)
    debugImplementation(libs.androidx.ui.tooling)
    debugImplementation(libs.androidx.ui.test.manifest)
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/proguard-rules.pro ---
--- CONTENT ---
# Proguard rules for the Bouncy Castle cryptography library.
-keep class org.bouncycastle.** { *; }
-dontwarn org.bouncycastle.**
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/AndroidManifest.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <!-- Permissions -->
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"
        tools:ignore="UnusedAttribute" />

    <application
        android:name=".IntentionRepeaterApplication"
        android:allowBackup="false"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.IntentionRepeater"
        tools:targetApi="31">

        <!-- Activities -->
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:launchMode="singleTask"
            android:windowSoftInputMode="adjustResize"
            android:theme="@style/Theme.IntentionRepeater">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".SettingsActivity" />
        <activity android:name=".RecordVoiceIntentionActivity" />

        <!-- Foreground Service -->
        <service
            android:name=".service.TimerForegroundService"
            android:exported="false"
            android:foregroundServiceType="specialUse">
            <!--
                Google Play requires justification for 'specialUse'.
                For this app, it would be "Boosting productivity" or similar,
                as the app's core function runs in the background.
            -->
        </service>

        <!-- File Provider for sharing/opening files securely -->
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <!-- Locale Config for Android 13+ per-app language preferences -->
        <meta-data
            android:name="android.app.lib_name"
            android:value="" />
        <meta-data
            android:name="android.locale_config"
            android:resource="@xml/locales_config"/>

    </application>
</manifest>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/IntentionRepeaterApplication.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater

import android.app.Application
import com.anthroteacher.intentionrepeater.data.IntentionRepository

class IntentionRepeaterApplication : Application() {
    // Using by lazy so the repository isn't created until it's needed
    val repository: IntentionRepository by lazy { IntentionRepository(this) }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/MainActivity.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater

import android.Manifest
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.os.Build
import android.os.Bundle
import android.os.IBinder
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.core.content.ContextCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.anthroteacher.intentionrepeater.service.ServiceState
import com.anthroteacher.intentionrepeater.service.TimerForegroundService
import com.anthroteacher.intentionrepeater.ui.main.MainScreen
import com.anthroteacher.intentionrepeater.ui.theme.IntentionRepeaterTheme
import com.anthroteacher.intentionrepeater.util.initializeBouncyCastle
import com.anthroteacher.intentionrepeater.viewmodel.MainViewModel
import com.anthroteacher.intentionrepeater.viewmodel.ViewModelFactory

class MainActivity : ComponentActivity() {

    private val viewModel: MainViewModel by viewModels {
        ViewModelFactory((application as IntentionRepeaterApplication).repository)
    }

    private var timerService: TimerForegroundService? by mutableStateOf(null)
    private var isBound by mutableStateOf(false)

    private val connection = object : ServiceConnection {
        override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
            val binder = service as? TimerForegroundService.LocalBinder ?: return
            timerService = binder.getService()
            isBound = true
        }

        override fun onServiceDisconnected(name: ComponentName?) {
            timerService = null
            isBound = false
        }
    }

    private val requestPermissionLauncher =
        registerForActivityResult(ActivityResultContracts.RequestPermission()) { _ -> }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initializeBouncyCastle()

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
            requestPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS)
        }

        setContent {
            IntentionRepeaterTheme {
                val intentions by viewModel.intentions.collectAsStateWithLifecycle()
                val serviceStateState = timerService?.serviceState?.collectAsStateWithLifecycle()
                val currentServiceState = serviceStateState?.value ?: ServiceState.Idle
                var iterationText by remember { mutableStateOf(getString(R.string.iterations_display_initial)) }

                LaunchedEffect(currentServiceState) {
                    iterationText = when (currentServiceState) {
                        is ServiceState.Running -> currentServiceState.timerState.iterations
                        is ServiceState.Finished -> currentServiceState.finalIterations
                        else -> getString(R.string.iterations_display_initial)
                    }
                }

                MainScreen(
                    intentions = intentions,
                    serviceState = currentServiceState,
                    iterationsDisplay = iterationText,
                    onResetIterations = {
                        iterationText = getString(R.string.iterations_display_initial)
                    },
                    viewModel = viewModel,
                    onStartService = ::startTimerService,
                    onStopService = ::stopTimerService
                )
            }
        }
    }

    private fun startTimerService() {
        val duration = getSharedPreferences("AppPreferences", MODE_PRIVATE)
            .getLong("Duration", 0L)

        val intent = Intent(this, TimerForegroundService::class.java).apply {
            action = TimerForegroundService.ACTION_START_SERVICE
            putExtra(TimerForegroundService.EXTRA_DURATION, duration)
        }
        ContextCompat.startForegroundService(this, intent)
        bindService(intent, connection, Context.BIND_AUTO_CREATE)
    }

    private fun stopTimerService() {
        if (isBound) {
            unbindService(connection)
            isBound = false
        }
        val intent = Intent(this, TimerForegroundService::class.java).apply {
            action = TimerForegroundService.ACTION_STOP_SERVICE
        }
        ContextCompat.startForegroundService(this, intent)
    }

    override fun onStart() {
        super.onStart()
        Intent(this, TimerForegroundService::class.java).also { intent ->
            bindService(intent, connection, Context.BIND_AUTO_CREATE)
        }
    }

    override fun onStop() {
        super.onStop()
        if (isBound) {
            unbindService(connection)
            isBound = false
        }
    }
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/RecordVoiceIntentionActivity.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater

import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.media.MediaPlayer
import android.media.MediaRecorder
import android.os.Build
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.result.contract.ActivityResultContracts
import androidx.core.content.ContextCompat
import com.anthroteacher.intentionrepeater.ui.recorder.RecordVoiceScreen
import com.anthroteacher.intentionrepeater.ui.theme.IntentionRepeaterTheme
import org.bouncycastle.jcajce.provider.digest.SHA3
import java.io.File
import java.io.FileInputStream
import java.io.IOException

class RecordVoiceIntentionActivity : ComponentActivity() {

    private var mediaRecorder: MediaRecorder? = null
    private var mediaPlayer: MediaPlayer? = null
    private lateinit var outputFile: File

    private val requestPermissionLauncher =
        registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted ->
            if (isGranted) {
                // The UI will handle the state change and call startRecording
            } else {
                // The UI will show a dialog explaining the need for the permission
            }
        }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        outputFile = File(externalCacheDir, "recorded_audio.3gp")

        setContent {
            IntentionRepeaterTheme {
                RecordVoiceScreen(
                    hasPermission = hasAudioPermission(),
                    onRequestPermission = { requestPermissionLauncher.launch(Manifest.permission.RECORD_AUDIO) },
                    onStartRecording = ::startRecording,
                    onStopRecording = ::stopRecording,
                    onStartPlaying = ::startPlaying,
                    onStopPlaying = ::stopPlaying,
                    onSave = {
                        val hash = hashFile(outputFile)
                        val resultIntent = Intent().putExtra("audioHash", hash)
                        setResult(RESULT_OK, resultIntent)
                        finish()
                    },
                    onCancel = { finish() }
                )
            }
        }
    }

    private fun hasAudioPermission(): Boolean {
        return ContextCompat.checkSelfPermission(
            this,
            Manifest.permission.RECORD_AUDIO
        ) == PackageManager.PERMISSION_GRANTED
    }

    private fun startRecording() {
        mediaRecorder = (if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
            MediaRecorder(this)
        } else {
            MediaRecorder()
        }).apply {
            setAudioSource(MediaRecorder.AudioSource.MIC)
            setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP)
            setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
            setOutputFile(outputFile.absolutePath)
            try {
                prepare()
                start()
            } catch (e: IOException) {
                e.printStackTrace()
            }
        }
    }

    private fun stopRecording() {
        mediaRecorder?.apply {
            stop()
            release()
        }
        mediaRecorder = null
    }

    private fun startPlaying(onComplete: () -> Unit) {
        mediaPlayer = MediaPlayer().apply {
            try {
                setDataSource(outputFile.absolutePath)
                prepare()
                start()
                setOnCompletionListener { onComplete() }
            } catch (e: IOException) {
                e.printStackTrace()
            }
        }
    }

    private fun stopPlaying() {
        mediaPlayer?.release()
        mediaPlayer = null
    }

    private fun hashFile(file: File): String {
        val digest = SHA3.Digest512()
        FileInputStream(file).use { fis ->
            val buffer = ByteArray(8192)
            var bytesRead: Int
            while (fis.read(buffer).also { bytesRead = it } != -1) {
                digest.update(buffer, 0, bytesRead)
            }
        }
        return digest.digest().joinToString("") { "%02x".format(it) }.uppercase()
    }

    override fun onDestroy() {
        super.onDestroy()
        mediaRecorder?.release()
        mediaPlayer?.release()
        if (outputFile.exists()) {
            outputFile.delete()
        }
    }
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/SettingsActivity.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater

import android.content.Context
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.anthroteacher.intentionrepeater.ui.settings.SettingsScreen
import com.anthroteacher.intentionrepeater.ui.theme.IntentionRepeaterTheme
import java.util.Locale

class SettingsActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            IntentionRepeaterTheme {
                SettingsScreen(
                    onBackPressed = { finish() },
                    onLocaleChange = { newLocale ->
                        setLocale(this, newLocale)
                        recreate()
                    }
                )
            }
        }
    }

    private fun setLocale(context: Context, languageCode: String) {
        val locale = Locale(languageCode)
        Locale.setDefault(locale)
        val config = context.resources.configuration
        config.setLocale(locale)
        context.createConfigurationContext(config)
        context.resources.updateConfiguration(config, context.resources.displayMetrics)
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/data/AppDatabase.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.data

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.sqlite.db.SupportSQLiteDatabase
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

@Database(entities = [Intention::class], version = 1, exportSchema = false)
abstract class AppDatabase : RoomDatabase() {
    abstract fun intentionDao(): IntentionDao

    companion object {
        @Volatile
        private var INSTANCE: AppDatabase? = null

        fun getDatabase(context: Context): AppDatabase {
            return INSTANCE ?: synchronized(this) {
                val instance = Room.databaseBuilder(
                    context.applicationContext,
                    AppDatabase::class.java,
                    "intention_database"
                )
                .addCallback(object : Callback() {
                    override fun onCreate(db: SupportSQLiteDatabase) {
                        super.onCreate(db)
                        // Pre-populate the database with one default intention
                        CoroutineScope(Dispatchers.IO).launch {
                            INSTANCE?.intentionDao()?.insert(Intention(id = 1))
                        }
                    }
                })
                .build()
                INSTANCE = instance
                instance
            }
        }
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/data/Intention.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.data

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

@Entity(tableName = "intentions")
data class Intention(
    @PrimaryKey(autoGenerate = true) var id: Int = 0, // Changed from val to var
    var intention: String = "",
    var multiplier: Double = 1.0,
    var frequency: String = "1",
    var awakeDevice: Boolean = false,
    var boostPower: Boolean = true,
    @ColumnInfo(name = "timer_running") var timerRunning: Boolean = false,
    @ColumnInfo(name = "is_notification") var isNotification: Boolean = true,

    // Fields ignored by the database for runtime use only
    @Ignore var timerStartedAt: Long = 0L,
    @Ignore var lastSecond: Long = 0L,
    @Ignore var lastHourMark: Long = -1,
    @Ignore var isFirstIterationSet: Boolean = false,
    @Ignore var iterations: Double = 0.0,
    @Ignore var iterationsInLastSecond: Double = 0.0,
    @Ignore var elapsedTime: Long = 0L,
    @Ignore var targetLength: Long = 0L,
    @Ignore var processedIntention: String = "",
    @Ignore var tempHashedIntention: String = ""
)
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/data/IntentionDao.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.data

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import kotlinx.coroutines.flow.Flow

@Dao
interface IntentionDao {
    @Query("SELECT * FROM intentions ORDER BY id ASC")
    fun getAllIntentions(): Flow<List<Intention>>

    @Query("SELECT * FROM intentions WHERE id = :id")
    suspend fun getIntentionById(id: Int): Intention?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(intention: Intention): Long

    @Update
    suspend fun update(intention: Intention)

    @Delete
    suspend fun delete(intention: Intention)

    @Query("SELECT * FROM intentions WHERE timer_running = 1")
    suspend fun getRunningIntentions(): List<Intention>

    @Query("UPDATE intentions SET timer_running = 0")
    suspend fun stopAllIntentions()

    @Query("UPDATE intentions SET is_notification = 0")
    suspend fun clearAllNotifications()

    @Query("UPDATE intentions SET is_notification = 1 WHERE id = :id")
    suspend fun setNotificationForId(id: Int)

    @Query("SELECT COUNT(*) FROM intentions")
    suspend fun getCount(): Int
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/data/IntentionRepository.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.data

import android.content.Context
import androidx.annotation.WorkerThread
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.withContext
import kotlinx.coroutines.Dispatchers

class IntentionRepository(context: Context) {
    private val intentionDao = AppDatabase.getDatabase(context).intentionDao()

    val allIntentions: Flow<List<Intention>> = intentionDao.getAllIntentions()

    @WorkerThread
    suspend fun insert(intention: Intention): Long {
        return intentionDao.insert(intention)
    }

    @WorkerThread
    suspend fun update(intention: Intention) {
        intentionDao.update(intention)
    }

    @WorkerThread
    suspend fun delete(intention: Intention) {
        intentionDao.delete(intention)
    }
    
    @WorkerThread
    suspend fun ensureAtLeastOneIntention() {
        if (intentionDao.getCount() == 0) {
            insert(Intention())
        }
    }

    @WorkerThread
    suspend fun setNotificationIntention(id: Int) = withContext(Dispatchers.IO) {
        intentionDao.clearAllNotifications()
        intentionDao.setNotificationForId(id)
    }

    @WorkerThread
    suspend fun stopAll() {
        intentionDao.stopAllIntentions()
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/service/TimerForegroundService.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.service

import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.Service
import android.content.Context
import android.content.Intent
import android.os.Binder
import android.os.Build
import android.os.IBinder
import android.os.PowerManager
import androidx.core.app.NotificationCompat
import com.anthroteacher.intentionrepeater.MainActivity
import com.anthroteacher.intentionrepeater.R
import com.anthroteacher.intentionrepeater.data.Intention
import com.anthroteacher.intentionrepeater.data.IntentionRepository
import com.anthroteacher.intentionrepeater.util.formatDecimalNumber
import com.anthroteacher.intentionrepeater.util.formatLargeFreq
import com.anthroteacher.intentionrepeater.util.formatLargeNumber
import com.anthroteacher.intentionrepeater.util.sha512
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import java.math.BigInteger
import java.util.Locale
import kotlin.math.max

class TimerForegroundService : Service() {

    private val binder = LocalBinder()
    private val serviceJob = SupervisorJob()
    private val serviceScope = CoroutineScope(Dispatchers.Default + serviceJob)
    private lateinit var repository: IntentionRepository
    private lateinit var notificationManager: NotificationManager
    private var wakeLock: PowerManager.WakeLock? = null

    private var runningIntentions = mutableListOf<Intention>()

    private val _serviceState = MutableStateFlow<ServiceState>(ServiceState.Idle)
    val serviceState = _serviceState.asStateFlow()

    private var durationSec: Long = 0L

    companion object {
        const val NOTIFICATION_ID = 1
        const val ACTION_START_SERVICE = "ACTION_START_SERVICE"
        const val ACTION_STOP_SERVICE = "ACTION_STOP_SERVICE"
        const val EXTRA_DURATION = "EXTRA_DURATION"
    }

    override fun onCreate() {
        super.onCreate()
        repository = (application as com.anthroteacher.intentionrepeater.IntentionRepeaterApplication).repository
        notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
        createNotificationChannel()
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        when (intent?.action) {
            ACTION_START_SERVICE -> {
                durationSec = intent.getLongExtra(EXTRA_DURATION, 0L)
                startForegroundService()
            }
            ACTION_STOP_SERVICE -> stopService()
        }
        return START_STICKY
    }

    private fun startForegroundService() {
        serviceScope.launch {
            val intentionsSnapshot = repository.allIntentions.first()
            runningIntentions = intentionsSnapshot
                .filter { it.timerRunning }
                .onEach { intention ->
                    intention.timerStartedAt = System.nanoTime()
                    intention.elapsedTime = 0L
                    intention.iterations = 0.0
                    intention.iterationsInLastSecond = 0.0
                }
                .toMutableList()

            if (runningIntentions.isEmpty()) {
                stopService()
                return@launch
            }

            acquireWakeLock()
            startForeground(
                NOTIFICATION_ID,
                createNotification("00:00:00", getString(R.string.loading_intention))
            )

            _serviceState.value = ServiceState.Running(TimerState(isRunning = true))
            timerLoop()
        }
    }

    private suspend fun timerLoop() {
        while (runningIntentions.any { it.timerRunning }) {
            val startTime = System.nanoTime()
            val notificationIntention = runningIntentions.firstOrNull { it.isNotification } ?: runningIntentions.firstOrNull()

            runningIntentions.forEach { intention ->
                processIntentionTick(intention)
            }

            if (notificationIntention != null) {
                updateNotificationAndUI(notificationIntention)
            }

            val processTimeMs = (System.nanoTime() - startTime) / 1_000_000
            delay(max(0L, 1000L - processTimeMs))
        }
        stopService()
    }

    private fun processIntentionTick(intention: Intention) {
        val now = System.nanoTime()
        intention.elapsedTime = (now - intention.timerStartedAt) / 1_000_000L

        if (durationSec > 0 && intention.elapsedTime >= durationSec * 1000) {
            intention.timerRunning = false
            return
        }

        if (intention.targetLength == 0L) {
            val runtime = Runtime.getRuntime()
            val usedMemory = runtime.totalMemory() - runtime.freeMemory()
            val maxMemory = runtime.maxMemory()
            val availableMemory = maxMemory - usedMemory
            val safeAllocation = (availableMemory * 0.25).toLong()
            intention.targetLength = max(1, safeAllocation)

            val builder = StringBuilder()
            if (intention.intention.isNotEmpty()) {
                while (builder.length < intention.targetLength) {
                    builder.append(intention.intention)
                }
            }
            intention.processedIntention = builder.toString()
            intention.tempHashedIntention = intention.processedIntention
        }

        if (intention.boostPower) {
            intention.tempHashedIntention = sha512("${intention.tempHashedIntention}:${intention.processedIntention}")
        }

        val freq = intention.frequency.toDoubleOrNull() ?: 0.0
        updateIterations(intention, freq)
    }

    private fun updateIterations(intention: Intention, freq: Double) {
        when (freq) {
            3.0, 7.83 -> intention.iterationsInLastSecond = freq
            1.0 -> {
                val elapsedSeconds = intention.elapsedTime / 1000
                val currentHour = elapsedSeconds / 3600
                if (!intention.isFirstIterationSet) {
                    intention.iterationsInLastSecond = 1.0
                    intention.isFirstIterationSet = true
                    intention.lastHourMark = currentHour
                } else if (currentHour > intention.lastHourMark) {
                    intention.iterationsInLastSecond = 1.0
                    intention.lastHourMark = currentHour
                } else {
                    intention.iterationsInLastSecond = 0.0
                }
            }
            else -> intention.iterationsInLastSecond++
        }
        intention.iterations += intention.iterationsInLastSecond * intention.multiplier
    }

    private fun updateNotificationAndUI(intention: Intention) {
        val hours = intention.elapsedTime / 3600000
        val minutes = (intention.elapsedTime / 60000) % 60
        val seconds = (intention.elapsedTime / 1000) % 60
        val time = String.format(Locale.ENGLISH, "%02d:%02d:%02d", hours, minutes, seconds)

        val iterationsCount = BigInteger.valueOf(intention.iterations.toLong())
        val freqValue = (intention.iterationsInLastSecond * intention.multiplier).toFloat()
        val freq = when (intention.frequency.toDoubleOrNull() ?: 0.0) {
            7.83 -> formatDecimalNumber(this, freqValue)
            3.0 -> formatLargeFreq(this, freqValue)
            1.0 -> "${formatLargeNumber(this, iterationsCount)}${getString(R.string.unit_per_hour)}"
            else -> formatLargeFreq(this, freqValue)
        }

        val iterationText = getString(R.string.iterations_display, formatLargeNumber(this, iterationsCount), freq)

        val state = TimerState(time, iterationText, formatLargeNumber(this, iterationsCount), true)
        _serviceState.value = ServiceState.Running(state)

        val notification = createNotification(time, iterationText)
        notificationManager.notify(NOTIFICATION_ID, notification)
    }

    private fun stopService() {
        serviceScope.launch {
            repository.stopAll()
            when (val finalState = _serviceState.value) {
                is ServiceState.Running -> _serviceState.value = ServiceState.Finished(
                    getString(R.string.finished_status, finalState.timerState.iterationsCount)
                )
                else -> _serviceState.value = ServiceState.Idle
            }
        }
        releaseWakeLock()
        stopForeground(STOP_FOREGROUND_REMOVE)
        stopSelf()
    }

    override fun onDestroy() {
        super.onDestroy()
        serviceJob.cancel()
    }

    private fun acquireWakeLock() {
        if (wakeLock?.isHeld != true) {
            wakeLock = (getSystemService(Context.POWER_SERVICE) as PowerManager).run {
                newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "TimerForegroundService::WakeLock").apply {
                    acquire()
                }
            }
        }
    }

    private fun releaseWakeLock() {
        wakeLock?.let {
            if (it.isHeld) {
                it.release()
            }
        }
        wakeLock = null
    }

    private fun createNotification(time: String, text: String): Notification {
        val intent = Intent(this, MainActivity::class.java)
        val pendingIntent = PendingIntent.getActivity(
            this, 0, intent,
            PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
        )

        return NotificationCompat.Builder(this, "intention_channel")
            .setContentTitle(getString(R.string.notification_title))
            .setContentText(text)
            .setSubText(time)
            .setSmallIcon(R.drawable.ic_launcher_foreground)
            .setOngoing(true)
            .setOnlyAlertOnce(true)
            .setContentIntent(pendingIntent)
            .build()
    }

    private fun createNotificationChannel() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            val channel = NotificationChannel(
                "intention_channel",
                getString(R.string.notification_channel_name),
                NotificationManager.IMPORTANCE_LOW
            ).apply {
                description = getString(R.string.notification_channel_description)
            }
            notificationManager.createNotificationChannel(channel)
        }
    }

    inner class LocalBinder : Binder() {
        fun getService(): TimerForegroundService = this@TimerForegroundService
    }

    override fun onBind(intent: Intent): IBinder = binder
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/service/TimerState.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.service

// Data class to hold the state for the UI
data class TimerState(
    val time: String = "00:00:00",
    val iterations: String = "0 Iterations (0 Hz)",
    val iterationsCount: String = "0",
    val isRunning: Boolean = false
)

// Sealed class for events sent from the Service to the UI
sealed class ServiceState {
    object Idle : ServiceState()
    data class Running(val timerState: TimerState) : ServiceState()
    data class Finished(val finalIterations: String) : ServiceState()
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/Color.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.theme

import androidx.compose.ui.graphics.Color

val PrimaryBlue = Color(0xFF3B82F6)
val AccentGreen = Color(0xFF10B981)
val AccentRed = Color(0xFFEF4444)
val BackgroundDark = Color(0xFF121212)
val SurfaceDark = Color(0xFF1E1E1E)
val TextWhite = Color(0xFFEAEAEA)
val TextGray = Color(0xFF9E9E9E)
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/main/MainScreen.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.main

import android.app.Activity
import android.content.Intent
import android.net.Uri
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.AttachFile
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Mic
import androidx.compose.material.icons.filled.Notifications
import androidx.compose.material.icons.filled.NotificationsActive
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.Checkbox
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.ExposedDropdownMenuDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Slider
import androidx.compose.material3.SuggestionChip
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.anthroteacher.intentionrepeater.R
import com.anthroteacher.intentionrepeater.RecordVoiceIntentionActivity
import com.anthroteacher.intentionrepeater.SettingsActivity
import com.anthroteacher.intentionrepeater.data.Intention
import com.anthroteacher.intentionrepeater.service.ServiceState
import com.anthroteacher.intentionrepeater.ui.theme.AccentGreen
import com.anthroteacher.intentionrepeater.ui.theme.AccentRed
import com.anthroteacher.intentionrepeater.util.hashFileContent
import com.anthroteacher.intentionrepeater.viewmodel.MainViewModel
import kotlin.math.roundToInt

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MainScreen(
    intentions: List<Intention>,
    serviceState: ServiceState,
    iterationsDisplay: String,
    onResetIterations: () -> Unit,
    viewModel: MainViewModel,
    onStartService: () -> Unit,
    onStopService: () -> Unit
) {
    val context = LocalContext.current
    var selectedTabId by rememberSaveable { mutableStateOf(intentions.firstOrNull()?.id ?: 0) }

    LaunchedEffect(intentions) {
        if (intentions.isNotEmpty() && intentions.none { it.id == selectedTabId }) {
            selectedTabId = intentions.first().id
        }
    }

    val currentIntention = intentions.find { it.id == selectedTabId } ?: intentions.firstOrNull()

    val isTimerGloballyRunning = serviceState is ServiceState.Running
    val timerDisplay = when (serviceState) {
        is ServiceState.Running -> serviceState.timerState.time
        else -> "00:00:00"
    }

    val filePickerLauncher = rememberLauncherForActivityResult(
        contract = ActivityResultContracts.GetContent(),
        onResult = { uri: Uri? ->
            uri?.let {
                val hash = hashFileContent(context, it)
                currentIntention?.let { intention ->
                    val updatedText = intention.intention + hash
                    viewModel.updateIntention(intention.copy(intention = updatedText))
                }
            }
        }
    )

    val voiceRecordLauncher = rememberLauncherForActivityResult(
        contract = ActivityResultContracts.StartActivityForResult(),
        onResult = { result ->
            if (result.resultCode == Activity.RESULT_OK) {
                val hash = result.data?.getStringExtra("audioHash") ?: ""
                currentIntention?.let { intention ->
                    val updatedText = intention.intention + hash
                    viewModel.updateIntention(intention.copy(intention = updatedText))
                }
            }
        }
    )

    Scaffold(
        topBar = {
            TopAppBar(
                title = { Text(stringResource(R.string.app_name), style = MaterialTheme.typography.headlineMedium) },
                actions = {
                    IconButton(onClick = { context.startActivity(Intent(context, SettingsActivity::class.java)) }) {
                        Icon(Icons.Default.Settings, contentDescription = stringResource(R.string.cd_settings))
                    }
                },
                colors = TopAppBarDefaults.topAppBarColors(containerColor = MaterialTheme.colorScheme.background),
                scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
            )
        },
        containerColor = MaterialTheme.colorScheme.background
    ) { paddingValues ->
        if (currentIntention != null) {
            Column(
                modifier = Modifier
                    .fillMaxSize()
                    .padding(paddingValues)
                    .padding(horizontal = 16.dp)
                    .verticalScroll(rememberScrollState()),
                horizontalAlignment = Alignment.CenterHorizontally
            ) {
                IntentionTabs(
                    intentions = intentions,
                    selectedTabId = selectedTabId,
                    onTabSelected = { selectedTabId = it },
                    isTimerRunning = isTimerGloballyRunning
                )

                Spacer(Modifier.height(16.dp))

                OutlinedTextField(
                    value = currentIntention.intention,
                    onValueChange = { viewModel.updateIntention(currentIntention.copy(intention = it)) },
                    modifier = Modifier
                        .fillMaxWidth()
                        .height(180.dp),
                    label = { Text(stringResource(R.string.enter_intention_hint)) },
                    readOnly = isTimerGloballyRunning,
                    shape = RoundedCornerShape(12.dp)
                )

                ActionToolbar(
                    onAdd = { viewModel.addIntention() },
                    onDelete = {
                        if (intentions.size > 1) viewModel.deleteIntention(currentIntention)
                    },
                    onNotify = { viewModel.setNotification(currentIntention.id) },
                    onInsertFile = { filePickerLauncher.launch("*/*") },
                    onRecordVoice = { voiceRecordLauncher.launch(Intent(context, RecordVoiceIntentionActivity::class.java)) },
                    isNotification = currentIntention.isNotification,
                    canDelete = intentions.size > 1,
                    isReadOnly = isTimerGloballyRunning
                )

                TitledCard(title = stringResource(R.string.multiplier_label, currentIntention.multiplier.roundToInt())) {
                    Slider(
                        value = currentIntention.multiplier.toFloat(),
                        onValueChange = { viewModel.updateIntention(currentIntention.copy(multiplier = it.toDouble())) },
                        valueRange = 1f..100f,
                        steps = 98,
                        enabled = !isTimerGloballyRunning
                    )
                }

                TitledCard(title = stringResource(R.string.frequency_label)) {
                    FrequencyAndPowerOptions(
                        intention = currentIntention,
                        onUpdate = { viewModel.updateIntention(it) },
                        isReadOnly = isTimerGloballyRunning
                    )
                }

                Spacer(Modifier.height(24.dp))

                Text(timerDisplay, style = MaterialTheme.typography.displayLarge)
                Text(
                    text = iterationsDisplay,
                    style = MaterialTheme.typography.bodyLarge,
                    color = MaterialTheme.colorScheme.secondary,
                    textAlign = TextAlign.Center
                )

                Spacer(Modifier.height(24.dp))

                ControlButtons(
                    isRunning = isTimerGloballyRunning,
                    onStartClick = {
                        currentIntention.let {
                            viewModel.updateIntention(it.copy(timerRunning = true))
                            onStartService()
                        }
                    },
                    onStopClick = {
                        viewModel.stopAllIntentions()
                        onStopService()
                    },
                    onResetClick = {
                        viewModel.stopAllIntentions()
                        onResetIterations()
                    },
                    startEnabled = currentIntention.intention.isNotBlank() && !isTimerGloballyRunning
                )

                Spacer(Modifier.height(16.dp))
                Text(stringResource(R.string.version_display), style = MaterialTheme.typography.labelMedium)
                Spacer(Modifier.height(16.dp))
            }
        } else {
            Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
                CircularProgressIndicator()
            }
        }
    }
}

@Composable
private fun IntentionTabs(
    intentions: List<Intention>,
    selectedTabId: Int,
    onTabSelected: (Int) -> Unit,
    isTimerRunning: Boolean
) {
    val listState = rememberLazyListState()
    val selectedIndex = intentions.indexOfFirst { it.id == selectedTabId }

    LaunchedEffect(selectedIndex) {
        if (selectedIndex != -1) {
            listState.animateScrollToItem(selectedIndex)
        }
    }

    LazyRow(
        state = listState,
        modifier = Modifier.fillMaxWidth(),
        horizontalArrangement = Arrangement.Center,
        verticalAlignment = Alignment.CenterVertically
    ) {
        itemsIndexed(intentions, key = { _, item -> item.id }) { index, intention ->
            val isSelected = intention.id == selectedTabId
            SuggestionChip(
                onClick = { if (!isTimerRunning) onTabSelected(intention.id) },
                label = {
                    Text(
                        text = (index + 1).toString(),
                        maxLines = 1,
                        overflow = TextOverflow.Ellipsis
                    )
                },
                icon = {
                    Row(verticalAlignment = Alignment.CenterVertically) {
                        if (intention.isNotification) {
                            Icon(
                                Icons.Default.Notifications,
                                contentDescription = stringResource(R.string.cd_notification_active),
                                modifier = Modifier.size(18.dp)
                            )
                            Spacer(Modifier.width(4.dp))
                        }
                        if (intention.timerRunning && isTimerRunning) {
                            Box(
                                Modifier
                                    .size(10.dp)
                                    .clip(CircleShape)
                                    .background(AccentGreen)
                            )
                        }
                    }
                },
                modifier = Modifier.padding(horizontal = 4.dp),
                enabled = !isTimerRunning,
                border = BorderStroke(
                    width = 1.dp,
                    color = if (isSelected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurface.copy(alpha = 0.12f)
                )
            )
        }
    }
}

@Composable
private fun ActionToolbar(
    onAdd: () -> Unit,
    onDelete: () -> Unit,
    onNotify: () -> Unit,
    onInsertFile: () -> Unit,
    onRecordVoice: () -> Unit,
    isNotification: Boolean,
    canDelete: Boolean,
    isReadOnly: Boolean
) {
    Row(
        modifier = Modifier
            .fillMaxWidth()
            .padding(vertical = 8.dp),
        horizontalArrangement = Arrangement.SpaceBetween,
        verticalAlignment = Alignment.CenterVertically
    ) {
        Row {
            IconButton(onClick = onAdd, enabled = !isReadOnly) {
                Icon(Icons.Default.Add, stringResource(R.string.cd_add_intention))
            }
            IconButton(onClick = onDelete, enabled = canDelete && !isReadOnly) {
                Icon(Icons.Default.Delete, stringResource(R.string.cd_delete_intention))
            }
            IconButton(onClick = onNotify, enabled = !isReadOnly) {
                Icon(
                    imageVector = if (isNotification) Icons.Filled.NotificationsActive else Icons.Default.Notifications,
                    contentDescription = stringResource(R.string.cd_toggle_notification),
                    tint = if (isNotification) MaterialTheme.colorScheme.primary else LocalContentColor.current
                )
            }
        }
        Row {
            IconButton(onClick = onInsertFile, enabled = !isReadOnly) {
                Icon(Icons.Default.AttachFile, stringResource(R.string.cd_insert_file))
            }
            IconButton(onClick = onRecordVoice, enabled = !isReadOnly) {
                Icon(Icons.Default.Mic, stringResource(R.string.cd_record_voice))
            }
        }
    }
}

@Composable
private fun TitledCard(
    title: String,
    content: @Composable () -> Unit
) {
    Card(
        modifier = Modifier
            .fillMaxWidth()
            .padding(vertical = 8.dp),
        shape = RoundedCornerShape(12.dp),
        colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surface)
    ) {
        Column(Modifier.padding(16.dp)) {
            Text(title, style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.primary)
            Spacer(Modifier.height(8.dp))
            content()
        }
    }
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun FrequencyAndPowerOptions(
    intention: Intention,
    onUpdate: (Intention) -> Unit,
    isReadOnly: Boolean
) {
    val context = LocalContext.current
    var expanded by remember { mutableStateOf(false) }

    val frequencies = remember {
        mapOf(
            "3" to context.getString(R.string.freq_3_hz),
            "7.83" to context.getString(R.string.freq_7_83_hz),
            "0" to context.getString(R.string.freq_max),
            "1" to context.getString(R.string.freq_hourly)
        )
    }

    Column {
        ExposedDropdownMenuBox(
            expanded = expanded,
            onExpandedChange = { if (!isReadOnly) expanded = !expanded }
        ) {
            OutlinedTextField(
                value = frequencies[intention.frequency] ?: "",
                onValueChange = {},
                readOnly = true,
                trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded) },
                modifier = Modifier
                    .fillMaxWidth()
                    .menuAnchor(),
                shape = RoundedCornerShape(8.dp)
            )
            DropdownMenu(
                expanded = expanded,
                onDismissRequest = { expanded = false }
            ) {
                frequencies.forEach { (key, value) ->
                    DropdownMenuItem(
                        text = { Text(value) },
                        onClick = {
                            onUpdate(intention.copy(frequency = key))
                            expanded = false
                        }
                    )
                }
            }
        }

        Spacer(Modifier.height(8.dp))

        Row(
            verticalAlignment = Alignment.CenterVertically,
            modifier = Modifier.fillMaxWidth()
        ) {
            Checkbox(
                checked = intention.boostPower,
                onCheckedChange = { onUpdate(intention.copy(boostPower = it)) },
                enabled = !isReadOnly
            )
            Text(stringResource(R.string.power_boost_label), modifier = Modifier.padding(start = 8.dp))
        }
        Row(
            verticalAlignment = Alignment.CenterVertically,
            modifier = Modifier.fillMaxWidth()
        ) {
            Checkbox(
                checked = intention.awakeDevice,
                onCheckedChange = { onUpdate(intention.copy(awakeDevice = it)) },
                enabled = !isReadOnly
            )
            Text(stringResource(R.string.keep_awake_label), modifier = Modifier.padding(start = 8.dp))
        }
    }
}

@Composable
private fun ControlButtons(
    isRunning: Boolean,
    onStartClick: () -> Unit,
    onStopClick: () -> Unit,
    onResetClick: () -> Unit,
    startEnabled: Boolean
) {
    Row(
        modifier = Modifier.fillMaxWidth(),
        horizontalArrangement = Arrangement.spacedBy(16.dp)
    ) {
        Button(
            onClick = if (isRunning) onStopClick else onStartClick,
            modifier = Modifier
                .weight(2f)
                .height(50.dp),
            enabled = startEnabled || isRunning,
            shape = RoundedCornerShape(12.dp),
            colors = ButtonDefaults.buttonColors(
                containerColor = if (isRunning) AccentRed else AccentGreen
            )
        ) {
            Text(
                if (isRunning) stringResource(R.string.stop_button) else stringResource(R.string.start_button),
                fontSize = 16.sp
            )
        }
        OutlinedButton(
            onClick = onResetClick,
            modifier = Modifier
                .weight(1f)
                .height(50.dp),
            enabled = !isRunning,
            shape = RoundedCornerShape(12.dp)
        ) {
            Text(stringResource(R.string.reset_button))
        }
    }
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/recorder/RecordVoiceScreen.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.recorder

import android.content.Intent
import android.net.Uri
import android.provider.Settings
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.Mic
import androidx.compose.material.icons.filled.PlayArrow
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Stop
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.anthroteacher.intentionrepeater.R
import com.anthroteacher.intentionrepeater.ui.theme.AccentGreen
import com.anthroteacher.intentionrepeater.ui.theme.AccentRed
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import java.util.Locale

private enum class RecorderState { IDLE, RECORDING, FINISHED, PLAYING }

@Composable
fun RecordVoiceScreen(
    hasPermission: Boolean,
    onRequestPermission: () -> Unit,
    onStartRecording: () -> Unit,
    onStopRecording: () -> Unit,
    onStartPlaying: (() -> Unit) -> Unit,
    onStopPlaying: () -> Unit,
    onSave: () -> Unit,
    onCancel: () -> Unit
) {
    val context = LocalContext.current
    var recorderState by remember { mutableStateOf(RecorderState.IDLE) }
    var seconds by remember { mutableIntStateOf(0) }
    var showPermissionDialog by remember { mutableStateOf(false) }

    LaunchedEffect(recorderState) {
        if (recorderState == RecorderState.RECORDING || recorderState == RecorderState.PLAYING) {
            while (isActive) {
                delay(1000)
                seconds++
                if (recorderState == RecorderState.RECORDING && seconds >= 60) {
                    onStopRecording()
                    recorderState = RecorderState.FINISHED
                    break
                }
            }
        }
    }

    Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        Column(
            modifier = Modifier.padding(24.dp),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center
        ) {
            Text(stringResource(R.string.record_voice_title), style = MaterialTheme.typography.headlineMedium, textAlign = TextAlign.Center)
            Spacer(Modifier.height(16.dp))
            Text(stringResource(R.string.record_voice_description), style = MaterialTheme.typography.bodyMedium, textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurfaceVariant)
            Spacer(Modifier.height(48.dp))

            Text(
                text = String.format(Locale.US, "%02d:%02d", seconds / 60, seconds % 60),
                fontSize = 72.sp,
                fontFamily = androidx.compose.ui.text.font.FontFamily.Monospace
            )
            Text(
                text = when (recorderState) {
                    RecorderState.IDLE -> stringResource(R.string.record_status_idle)
                    RecorderState.RECORDING -> stringResource(R.string.record_status_recording)
                    RecorderState.FINISHED -> stringResource(R.string.record_status_finished)
                    RecorderState.PLAYING -> stringResource(R.string.record_status_playing)
                },
                style = MaterialTheme.typography.labelMedium
            )

            Spacer(Modifier.height(48.dp))

            when (recorderState) {
                RecorderState.IDLE -> {
                    LargeIconButton(
                        onClick = {
                            if (hasPermission) {
                                onStartRecording()
                                seconds = 0
                                recorderState = RecorderState.RECORDING
                            } else {
                                onRequestPermission()
                                showPermissionDialog = true
                            }
                        },
                        icon = Icons.Default.Mic,
                        contentDescription = "Record",
                        color = MaterialTheme.colorScheme.primary
                    )
                }
                RecorderState.RECORDING -> {
                    LargeIconButton(
                        onClick = {
                            onStopRecording()
                            recorderState = RecorderState.FINISHED
                        },
                        icon = Icons.Default.Stop,
                        contentDescription = "Stop Recording",
                        color = AccentRed
                    )
                }
                RecorderState.FINISHED, RecorderState.PLAYING -> {
                    Row(
                        horizontalArrangement = Arrangement.spacedBy(24.dp),
                        verticalAlignment = Alignment.CenterVertically
                    ) {
                        LargeIconButton(
                            onClick = {
                                seconds = 0
                                recorderState = RecorderState.IDLE
                            },
                            icon = Icons.Default.Refresh,
                            contentDescription = "Re-record",
                            color = MaterialTheme.colorScheme.onSurfaceVariant
                        )
                        LargeIconButton(
                            onClick = {
                                if (recorderState == RecorderState.PLAYING) {
                                    onStopPlaying()
                                    recorderState = RecorderState.FINISHED
                                } else {
                                    onStartPlaying { recorderState = RecorderState.FINISHED }
                                    seconds = 0
                                    recorderState = RecorderState.PLAYING
                                }
                            },
                            icon = if (recorderState == RecorderState.PLAYING) Icons.Default.Stop else Icons.Default.PlayArrow,
                            contentDescription = "Play/Stop",
                            color = MaterialTheme.colorScheme.primary
                        )
                        LargeIconButton(
                            onClick = onSave,
                            icon = Icons.Default.Check,
                            contentDescription = "Save",
                            color = AccentGreen
                        )
                    }
                }
            }
        }

        TextButton(onClick = onCancel, modifier = Modifier.align(Alignment.BottomCenter).padding(24.dp)) {
            Text(stringResource(R.string.back_button))
        }

        if (showPermissionDialog && !hasPermission) {
            PermissionDialog(
                onDismiss = { showPermissionDialog = false },
                onConfirm = {
                    showPermissionDialog = false
                    val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
                    val uri = Uri.fromParts("package", context.packageName, null)
                    intent.data = uri
                    context.startActivity(intent)
                }
            )
        }
    }
}

@Composable
private fun LargeIconButton(
    onClick: () -> Unit,
    icon: androidx.compose.ui.graphics.vector.ImageVector,
    contentDescription: String,
    color: Color
) {
    Button(
        onClick = onClick,
        modifier = Modifier.size(80.dp),
        shape = CircleShape,
        colors = ButtonDefaults.buttonColors(containerColor = color),
        contentPadding = PaddingValues(0.dp)
    ) {
        Icon(icon, contentDescription = contentDescription, modifier = Modifier.size(40.dp))
    }
}

@Composable
private fun PermissionDialog(onDismiss: () -> Unit, onConfirm: () -> Unit) {
    AlertDialog(
        onDismissRequest = onDismiss,
        title = { Text(stringResource(R.string.permission_required_title)) },
        text = { Text(stringResource(R.string.mic_permission_description)) },
        confirmButton = {
            Button(onClick = onConfirm) { Text(stringResource(R.string.open_settings_button)) }
        },
        dismissButton = {
            TextButton(onClick = onDismiss) { Text(stringResource(R.string.cancel_button)) }
        }
    )
}

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/settings/SettingsScreen.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.settings

import android.content.Context
import android.content.Intent
import android.net.Uri
import android.provider.Settings
import android.widget.Toast
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.unit.dp
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.FileProvider
import com.anthroteacher.intentionrepeater.R
import java.io.File
import java.util.Locale

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SettingsScreen(
    onBackPressed: () -> Unit,
    onLocaleChange: (String) -> Unit
) {
    val context = LocalContext.current
    val sharedPrefs = remember { context.getSharedPreferences("AppPreferences", Context.MODE_PRIVATE) }
    var duration by remember { mutableStateOf(sharedPrefs.getLong("Duration", 0L).toString()) }

    Scaffold(
        topBar = {
            TopAppBar(
                title = { Text(stringResource(R.string.settings_title)) },
                navigationIcon = {
                    IconButton(onClick = onBackPressed) {
                        Icon(Icons.Default.ArrowBack, contentDescription = stringResource(R.string.back_button))
                    }
                }
            )
        },
        containerColor = MaterialTheme.colorScheme.background
    ) { paddingValues ->
        LazyColumn(
            modifier = Modifier
                .fillMaxSize()
                .padding(paddingValues)
                .padding(16.dp),
            verticalArrangement = Arrangement.spacedBy(16.dp)
        ) {
            // Notification Settings
            item {
                SettingsGroup(title = stringResource(R.string.manage_notifications)) {
                    NotificationSettingsItem()
                }
            }

            // General Settings
            item {
                SettingsGroup(title = "General") {
                    Button(onClick = { openNotesFile(context) }, modifier = Modifier.fillMaxWidth()) {
                        Text(stringResource(R.string.open_notes))
                    }
                    LanguageDropdown(onLocaleChange)
                    OutlinedTextField(
                        value = duration,
                        onValueChange = {
                            val newDuration = it.filter { char -> char.isDigit() }
                            duration = newDuration
                            sharedPrefs.edit().putLong("Duration", newDuration.toLongOrNull() ?: 0L).apply()
                        },
                        label = { Text(stringResource(R.string.stop_on_duration_label)) },
                        placeholder = { Text(stringResource(R.string.duration_hint)) },
                        keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number),
                        modifier = Modifier.fillMaxWidth()
                    )
                }
            }

            // Links
            item {
                SettingsGroup(title = stringResource(R.string.links_header)) {
                    LinkButton(context, stringResource(R.string.website_button), "https://www.intentionrepeater.com")
                    LinkButton(context, stringResource(R.string.forum_button), "https://intentionrepeater.boards.net/")
                    LinkButton(context, stringResource(R.string.eula_button), "https://www.intentionrepeater.com/android_eula.html")
                    LinkButton(context, stringResource(R.string.privacy_policy_button), "https://www.intentionrepeater.com/android_privacy_policy.html")
                    LinkButton(context, stringResource(R.string.multihasher_app_button), "https://multihasher.intentionrepeater.com")
                }
            }
        }
    }
}

@Composable
private fun SettingsGroup(title: String, content: @Composable ColumnScope.() -> Unit) {
    Column {
        Text(title, style = MaterialTheme.typography.titleSmall, color = MaterialTheme.colorScheme.primary, modifier = Modifier.padding(bottom = 8.dp))
        Card(
            colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surface),
            modifier = Modifier.fillMaxWidth()
        ) {
            Column(Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(12.dp)) {
                content()
            }
        }
    }
}

@Composable
private fun NotificationSettingsItem() {
    val context = LocalContext.current
    var areNotificationsEnabled by remember {
        mutableStateOf(NotificationManagerCompat.from(context).areNotificationsEnabled())
    }

    val message = if (areNotificationsEnabled) {
        stringResource(R.string.notifications_enabled_message)
    } else {
        stringResource(R.string.notifications_disabled_message)
    }

    Column {
        Text(message, style = MaterialTheme.typography.bodyMedium)
        Spacer(Modifier.height(8.dp))
        Button(
            onClick = {
                val intent = Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
                    putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName)
                }
                context.startActivity(intent)
            },
            modifier = Modifier.fillMaxWidth()
        ) {
            Text(stringResource(R.string.manage_notifications))
        }
    }
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun LanguageDropdown(onLocaleChange: (String) -> Unit) {
    val context = LocalContext.current
    var expanded by remember { mutableStateOf(false) }
    val currentLocaleCode = Locale.getDefault().language
    val languages = remember {
        mapOf(
            "en" to "English",
            "es" to "Español",
            "fr" to "Français",
            "de" to "Deutsch",
            "ja" to "日本語",
            "hi" to "हिन्दी"
        )
    }
    var selectedLanguage by remember { mutableStateOf(languages[currentLocaleCode] ?: "English") }

    ExposedDropdownMenuBox(
        expanded = expanded,
        onExpandedChange = { expanded = !expanded }
    ) {
        OutlinedTextField(
            value = selectedLanguage,
            onValueChange = {},
            label = { Text(stringResource(R.string.language_label)) },
            readOnly = true,
            trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded) },
            modifier = Modifier.fillMaxWidth().menuAnchor()
        )
        ExposedDropdownMenu(
            expanded = expanded,
            onDismissRequest = { expanded = false }
        ) {
            languages.forEach { (code, name) ->
                DropdownMenuItem(
                    text = { Text(name) },
                    onClick = {
                        selectedLanguage = name
                        expanded = false
                        onLocaleChange(code)
                    }
                )
            }
        }
    }
}

@Composable
private fun LinkButton(context: Context, text: String, url: String) {
    Button(
        onClick = {
            val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
            context.startActivity(intent)
        },
        modifier = Modifier.fillMaxWidth()
    ) {
        Text(text)
    }
}

private fun openNotesFile(context: Context) {
    val notesFile = File(context.filesDir, "intention_repeater_notes.txt")
    if (!notesFile.exists()) {
        notesFile.createNewFile()
    }
    val uri = FileProvider.getUriForFile(context, "${context.packageName}.provider", notesFile)
    val intent = Intent(Intent.ACTION_VIEW).apply {
        setDataAndType(uri, "text/plain")
        flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION
    }
    try {
        context.startActivity(intent)
    } catch (e: Exception) {
        Toast.makeText(context, context.getString(R.string.no_text_editor_error), Toast.LENGTH_LONG).show()
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/theme/Theme.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.theme

import android.app.Activity
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat

private val DarkColorScheme = darkColorScheme(
    primary = PrimaryBlue,
    secondary = AccentGreen,
    tertiary = AccentRed,
    background = BackgroundDark,
    surface = SurfaceDark,
    onPrimary = TextWhite,
    onSecondary = TextWhite,
    onTertiary = TextWhite,
    onBackground = TextWhite,
    onSurface = TextWhite,
)

@Composable
fun IntentionRepeaterTheme(
    content: @Composable () -> Unit
) {
    val colorScheme = DarkColorScheme
    val view = LocalView.current
    if (!view.isInEditMode) {
        SideEffect {
            val window = (view.context as Activity).window
            window.statusBarColor = colorScheme.background.toArgb()
            WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = false
        }
    }

    MaterialTheme(
        colorScheme = colorScheme,
        typography = Typography,
        content = content
    )
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/ui/theme/Type.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.ui.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp

val Typography = Typography(
    displayLarge = TextStyle(
        fontFamily = FontFamily.Serif,
        fontWeight = FontWeight.Normal,
        fontSize = 57.sp,
        lineHeight = 64.sp,
        letterSpacing = (-0.25).sp,
        color = TextWhite
    ),
    headlineMedium = TextStyle(
        fontFamily = FontFamily.Serif,
        fontWeight = FontWeight.SemiBold,
        fontSize = 28.sp,
        lineHeight = 36.sp,
        color = TextWhite
    ),
    bodyLarge = TextStyle(
        fontFamily = FontFamily.Default,
        fontWeight = FontWeight.Normal,
        fontSize = 16.sp,
        lineHeight = 24.sp,
        letterSpacing = 0.5.sp,
        color = TextWhite
    ),
    labelMedium = TextStyle(
        fontFamily = FontFamily.Default,
        fontWeight = FontWeight.Medium,
        fontSize = 12.sp,
        lineHeight = 16.sp,
        letterSpacing = 0.5.sp,
        color = TextGray
    )
)
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/util/Utils.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.util

import android.content.Context
import android.net.Uri
import com.anthroteacher.intentionrepeater.R
import org.bouncycastle.jcajce.provider.digest.SHA3
import java.io.InputStream
import java.math.BigInteger
import java.math.RoundingMode
import java.security.Security

// Initialize Bouncy Castle provider
fun initializeBouncyCastle() {
    Security.addProvider(org.bouncycastle.jce.provider.BouncyCastleProvider())
}

fun sha512(input: String): String {
    val bytes = SHA3.Digest512().digest(input.toByteArray())
    return bytes.joinToString("") { "%02x".format(it) }
}

fun hashFileContent(context: Context, uri: Uri): String {
    var inputStream: InputStream? = null
    return try {
        inputStream = context.contentResolver.openInputStream(uri)
        val buffer = ByteArray(8192) // 8KB buffer
        val digest = SHA3.Digest512()
        var bytesRead: Int

        inputStream?.let { stream ->
            while (stream.read(buffer).also { bytesRead = it } != -1) {
                digest.update(buffer, 0, bytesRead)
            }
        }

        digest.digest().joinToString("") { "%02x".format(it) }.uppercase()
    } catch (e: Exception) {
        e.printStackTrace()
        ""
    } finally {
        inputStream?.close()
    }
}

fun formatDecimalNumber(context: Context, value: Float): String {
    val units = arrayOf(context.getString(R.string.unit_hz), context.getString(R.string.unit_khz), context.getString(R.string.unit_mhz), context.getString(R.string.unit_ghz), context.getString(R.string.unit_thz), context.getString(R.string.unit_phz), context.getString(R.string.unit_ehz))
    var adjustedValue = value.toDouble()
    var unitIndex = 0

    while (adjustedValue >= 1000 && unitIndex < units.size - 1) {
        adjustedValue /= 1000
        unitIndex++
    }

    return String.format("%.2f %s", adjustedValue, units[unitIndex])
}

fun formatLargeFreq(context: Context, value: Float): String {
    val units = arrayOf(context.getString(R.string.unit_hz), context.getString(R.string.unit_khz), context.getString(R.string.unit_mhz), context.getString(R.string.unit_ghz), context.getString(R.string.unit_thz), context.getString(R.string.unit_phz), context.getString(R.string.unit_ehz))
    var adjustedValue = value.toDouble()
    var unitIndex = 0

    while (adjustedValue >= 1000 && unitIndex < units.size - 1) {
        adjustedValue /= 1000
        unitIndex++
    }

    return if (unitIndex == 0) {
        String.format("%.0f %s", adjustedValue, units[unitIndex])
    } else {
        String.format("%.3f %s", adjustedValue, units[unitIndex])
    }
}

fun formatLargeNumber(context: Context, value: BigInteger): String {
    if (value < BigInteger.valueOf(1000)) {
        return value.toString()
    }

    val names = arrayOf("", context.getString(R.string.unit_k), context.getString(R.string.unit_m), context.getString(R.string.unit_b), context.getString(R.string.unit_t), context.getString(R.string.unit_q), context.getString(R.string.unit_Q), context.getString(R.string.unit_s), context.getString(R.string.unit_S))
    val magnitude = value.toString().length
    val index = (magnitude - 1) / 3

    if (index >= names.size) {
        return value.toString() // Fallback for extremely large numbers
    }

    val divisor = BigInteger.TEN.pow(index * 3)
    val formattedValue = value.toBigDecimal().divide(divisor.toBigDecimal(), 3, RoundingMode.HALF_UP)

    return String.format("%.3f%s", formattedValue, names[index])
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/viewmodel/MainViewModel.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.viewmodel

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.anthroteacher.intentionrepeater.data.Intention
import com.anthroteacher.intentionrepeater.data.IntentionRepository
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch

class MainViewModel(private val repository: IntentionRepository) : ViewModel() {

    val intentions: StateFlow<List<Intention>> = repository.allIntentions
        .stateIn(
            scope = viewModelScope,
            started = SharingStarted.WhileSubscribed(5000L),
            initialValue = emptyList()
        )

    fun addIntention() = viewModelScope.launch {
        repository.insert(Intention())
    }

    fun updateIntention(intention: Intention) = viewModelScope.launch {
        repository.update(intention)
    }

    fun deleteIntention(intention: Intention) = viewModelScope.launch {
        repository.delete(intention)
        repository.ensureAtLeastOneIntention()
    }

    fun setNotification(id: Int) = viewModelScope.launch {
        repository.setNotificationIntention(id)
    }
    
    fun stopAllIntentions() = viewModelScope.launch {
        repository.stopAll()
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/java/com/anthroteacher/intentionrepeater/viewmodel/ViewModelFactory.kt ---
--- CONTENT ---
package com.anthroteacher.intentionrepeater.viewmodel

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.anthroteacher.intentionrepeater.data.IntentionRepository

class ViewModelFactory(private val repository: IntentionRepository) : ViewModelProvider.Factory {
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        if (modelClass.isAssignableFrom(MainViewModel::class.java)) {
            @Suppress("UNCHECKED_CAST")
            return MainViewModel(repository) as T
        }
        throw IllegalArgumentException("Unknown ViewModel class")
    }
}
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/drawable/ic_launcher_background.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillColor="#3DDC84"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,0L39,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M99,0L99,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,59L108,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,39L89,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M39,19L39,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
</vector>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/drawable/ic_launcher_foreground.xml ---
--- CONTENT ---
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
        <aapt:attr name="android:fillColor">
            <gradient
                android:endX="85.84757"
                android:endY="92.4963"
                android:startX="42.9492"
                android:startY="49.59793"
                android:type="linear">
                <item
                    android:color="#44000000"
                    android:offset="0.0" />
                <item
                    android:color="#00000000"
                    android:offset="1.0" />
            </gradient>
        </aapt:attr>
    </path>
    <path
        android:fillColor="#FFFFFF"
        android:fillType="nonZero"
        android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
        android:strokeWidth="1"
        android:strokeColor="#00000000" />
</vector>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/mipmap-hdpi/ic_launcher.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-hdpi/ic_launcher_round.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-mdpi/ic_launcher.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-mdpi/ic_launcher_round.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xhdpi/ic_launcher.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxhdpi/ic_launcher.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp ---
[Resource File - Path Only]
--- END FILE ---

--- FILE: app/src/main/res/values/colors.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="black">#FF000000</color>
    <color name="white">#FFFFFFFF</color>
</resources>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values/strings.xml ---
--- CONTENT ---
<resources>
    <string name="app_name">Intention Repeater</string>
    <string name="by_anthro_teacher">by Anthro Teacher</string>
    <string name="enter_intention_hint">Enter your intention here…</string>
    <string name="multiplier_label">Multiplier: %1$d</string>
    <string name="frequency_label">Frequency</string>
    <string name="power_boost_label">Power Boost (SHA-512)</string>
    <string name="keep_awake_label">Keep Device Awake</string>
    <string name="keep_awake_tooltip">Prevents device from sleeping. Increases battery usage.</string>
    <string name="start_button">START</string>
    <string name="stop_button">STOP</string>
    <string name="reset_button">RESET</string>
    <string name="iterations_display">%1$s Iterations (%2$s)</string>
    <string name="iterations_display_initial">0 Iterations (0 Hz)</string>
    <string name="loading_intention">Loading Intention…</string>
    <string name="finished_status">Finished: %1$s</string>
    <string name="version_display">Version 3.0</string>

    <!-- Settings Screen -->
    <string name="settings_title">Settings</string>
    <string name="manage_notifications">Manage Notifications</string>
    <string name="notifications_enabled_message">Notifications are ENABLED. Updates will show in the status bar while running.</string>
    <string name="notifications_disabled_message">Notifications are DISABLED. Enable them to see progress when the app is in the background.</string>
    <string name="open_notes">Open Notes File</string>
    <string name="no_text_editor_error">No text editor found. Please install one from the Play Store.</string>
    <string name="language_label">Language</string>
    <string name="update_language_button">Update Language</string>
    <string name="stop_on_duration_label">Stop After Duration (Seconds)</string>
    <string name="duration_hint">0 (Runs indefinitely)</string>
    <string name="links_header">Links</string>
    <string name="website_button">Website</string>
    <string name="forum_button">Forum</string>
    <string name="eula_button">EULA</string>
    <string name="privacy_policy_button">Privacy Policy</string>
    <string name="multihasher_app_button">Multihasher App</string>
    <string name="back_button">Back</string>

    <!-- Voice Recording -->
    <string name="record_voice_title">Record Voice Intention</string>
    <string name="record_voice_description">Embed the energy of your voice directly into your intention. The recording will be hashed and appended to the text. Max 60 seconds.</string>
    <string name="record_status_idle">Tap mic to record</string>
    <string name="record_status_recording">Recording…</string>
    <string name="record_status_playing">Playing…</string>
    <string name="record_status_paused">Paused</string>
    <string name="record_status_finished">Tap play to listen</string>
    <string name="save_button">Save</string>
    <string name="rerecord_button">Re-record</string>
    <string name="permission_required_title">Permission Required</string>
    <string name="mic_permission_description">This app needs microphone access to record your voice. Please enable it in your device settings.</string>
    <string name="open_settings_button">Open Settings</string>
    <string name="cancel_button">Cancel</string>

    <!-- Frequency Options -->
    <string name="freq_3_hz">3 Hz (Classic)</string>
    <string name="freq_7_83_hz">7.83 Hz (Schumann Resonance)</string>
    <string name="freq_max">Maximum</string>
    <string name="freq_hourly">Once per Hour</string>

    <!-- Content Descriptions for Accessibility -->
    <string name="cd_add_intention">Add new intention</string>
    <string name="cd_delete_intention">Delete current intention</string>
    <string name="cd_toggle_notification">Toggle notification for this intention</string>
    <string name="cd_insert_file">Insert file hash into intention</string>
    <string name="cd_record_voice">Record voice hash into intention</string>
    <string name="cd_settings">Open settings</string>
    <string name="cd_scroll_tabs_left">Scroll tabs left</string>
    <string name="cd_scroll_tabs_right">Scroll tabs right</string>
    <string name="cd_notification_active">Notification is active for this intention</string>
    <string name="cd_timer_running">Timer is running for this intention</string>

    <!-- Units -->
    <string name="unit_hz">Hz</string>
    <string name="unit_khz">kHz</string>
    <string name="unit_mhz">MHz</string>
    <string name="unit_ghz">GHz</string>
    <string name="unit_thz">THz</string>
    <string name="unit_phz">PHz</string>
    <string name="unit_ehz">EHz</string>
    <string name="unit_k">k</string>
    <string name="unit_m">M</string>
    <string name="unit_b">B</string>
    <string name="unit_t">T</string>
    <string name="unit_q">q</string>
    <string name="unit_Q">Q</string>
    <string name="unit_s">s</string>
    <string name="unit_S">S</string>
    <string name="unit_per_hour">/hr</string>

    <!-- Notifications -->
    <string name="notification_channel_name">Intention Progress</string>
    <string name="notification_channel_description">Shows the current status of running intentions.</string>
    <string name="notification_title">Intention Repeater is running</string>
</resources>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values/themes.xml ---
--- CONTENT ---
<resources>
    <!-- Base application theme. -->
    <style name="Theme.IntentionRepeater" parent="android:Theme.Material.Light.NoActionBar" />
</resources>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values-de/strings.xml ---
--- CONTENT ---
<resources>
<string name="app_name">Absicht Repeater</string>
<string name="by_anthro_teacher">vom Anthro -Lehrer</string>
<string name="enter_intention_hint">Geben Sie hier Ihre Absicht ein…</string>
<string name="multiplier_label">Multiplizieren: %$ 1 d</string>
<string name="frequency_label">Frequenz</string>
<string name="power_boost_label">Power Boost (SHA-512)</string>
<string name="keep_awake_label">Halten Sie das Gerät wach</string>
<string name="keep_awake_tooltip">Verhindert, dass das Gerät schlafen. Erhöht die Batterieverwendung.</string>
<string name="start_button">START</string>
<string name="stop_button">STOPPEN</string>
<string name="reset_button">ZURÜCKSETZEN</string>
<string name="iterations_display">%1$s Iterationen (%2$s)</string>
<string name="iterations_display_initial">0 Iterationen (0 Hz)</string>
<string name="loading_intention">Ladungsabsicht…</string>
<string name="finished_status">Fertig: %1 $ s</string>
<string name="version_display">Version 3.0</string>

    <!-- Settings Screen -->
<string name="settings_title">Einstellungen</string>
<string name="manage_notifications">Benachrichtigungen verwalten</string>
<string name="notifications_enabled_message">Benachrichtigungen sind aktiviert. Updates werden in der Statusleiste während des Laufens angezeigt.</string>
<string name="notifications_disabled_message">Benachrichtigungen sind deaktiviert. Ermöglichen Sie ihnen den Fortschritt, wenn sich die App im Hintergrund befindet.</string>
<string name="open_notes">Öffnen Sie die Notizendatei</string>
<string name="no_text_editor_error">Kein Texteditor gefunden. Bitte installieren Sie eine im Play Store.</string>
<string name="language_label">Sprache</string>
<string name="update_language_button">Sprache aktualisieren</string>
<string name="stop_on_duration_label">Stoppen Sie nach der Dauer (Sekunden)</string>
<string name="duration_hint">0 (läuft auf unbestimmte Zeit)</string>
<string name="links_header">Links</string>
<string name="website_button">Webseite</string>
<string name="forum_button">Forum</string>
<string name="eula_button">Eula</string>
<string name="privacy_policy_button">Datenschutzrichtlinie</string>
<string name="multihasher_app_button">Multihasher App</string>
<string name="back_button">Zurück</string>

    <!-- Voice Recording -->
<string name="record_voice_title">Aufzeichnung der Sprachabsicht</string>
<string name="record_voice_description">Lassen Sie die Energie Ihrer Stimme direkt in Ihre Absicht ein. Die Aufzeichnung wird dem Text gehasht und angehängt. Max. 60 Sekunden.</string>
<string name="record_status_idle">Tippen Sie auf das Mikrofon, um aufzunehmen</string>
<string name="record_status_recording">Aufnahme…</string>
<string name="record_status_playing">Spielen ...</string>
<string name="record_status_paused">Blättern</string>
<string name="record_status_finished">Tippen Sie auf das Spiel, um zu hören</string>
<string name="save_button">Speichern</string>
<string name="rerecord_button">Wiederaufnahme</string>
<string name="permission_required_title">Erlaubnis erforderlich</string>
<string name="mic_permission_description">Diese App benötigt Mikrofonzugriff, um Ihre Stimme aufzunehmen. Bitte aktivieren Sie es in Ihren Geräteeinstellungen.</string>
<string name="open_settings_button">Einstellungen geöffnet</string>
<string name="cancel_button">Stornieren</string>

    <!-- Frequency Options -->
<string name="freq_3_hz">3 Hz (Klassiker)</string>
<string name="freq_7_83_hz">7,83 Hz (Schumann Resonance)</string>
<string name="freq_max">Maximal</string>
<string name="freq_hourly">Einmal pro Stunde</string>

    <!-- Content Descriptions for Accessibility -->
<string name="cd_add_intention">Neue Absicht hinzufügen</string>
<string name="cd_delete_intention">Aktuelle Absicht löschen</string>
<string name="cd_toggle_notification">Benachrichtigung für diese Absicht umschalten</string>
<string name="cd_insert_file">Fügen Sie Datei -Hash in die Absicht ein</string>
<string name="cd_record_voice">Aufzeichnung von Voice -Hash in die Absicht aufnehmen</string>
<string name="cd_settings">Einstellungen geöffnet</string>
<string name="cd_scroll_tabs_left">Scroll -Registerkarten links</string>
<string name="cd_scroll_tabs_right">Scrollen Sie die Registerkarten nach rechts</string>
<string name="cd_notification_active">Die Benachrichtigung ist für diese Absicht aktiv</string>
<string name="cd_timer_running">Timer läuft für diese Absicht</string>

    <!-- Units -->
<string name="unit_hz">Hz</string>
<string name="unit_khz">KHz</string>
<string name="unit_mhz">MHz</string>
<string name="unit_ghz">GHz</string>
<string name="unit_thz">Thz</string>
<string name="unit_phz">Phz</string>
<string name="unit_ehz">EHz</string>
<string name="unit_k">k</string>
<string name="unit_m">M</string>
<string name="unit_b">B</string>
<string name="unit_t">T</string>
<string name="unit_q">Q</string>
<string name="unit_Q">Q</string>
<string name="unit_s">S</string>
<string name="unit_S">S</string>
<string name="unit_per_hour">/hr</string>

    <!-- Notifications -->
<string name="notification_channel_name">Absicht Fortschritte</string>
<string name="notification_channel_description">Zeigt den aktuellen Status von Auslaufabsichten an.</string>
<string name="notification_title">Absicht Repeater läuft</string>
</resources>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values-es/strings.xml ---
--- CONTENT ---
<resources>
<string name="app_name">Repetidor de intención</string>
<string name="by_anthro_teacher">por el profesor de antro</string>
<string name="enter_intention_hint">Ingrese su intención aquí ...</string>
<string name="multiplier_label">Multiplicar: %$ 1 D</string>
<string name="frequency_label">Frecuencia</string>
<string name="power_boost_label">Power Boost (SHA-512)</string>
<string name="keep_awake_label">Mantenga el dispositivo despierto</string>
<string name="keep_awake_tooltip">Evita que el dispositivo duerma. Aumenta el uso de la batería.</string>
<string name="start_button">COMENZAR</string>
<string name="stop_button">DETENER</string>
<string name="reset_button">REINICIAR</string>
<string name="iterations_display">%1$s iteraciones (%2$s)</string>
<string name="iterations_display_initial">0 iteraciones (0 Hz)</string>
<string name="loading_intention">Intención de carga ...</string>
<string name="finished_status">Terminado: %1 $ s</string>
<string name="version_display">Versión 3.0</string>

    <!-- Settings Screen -->
<string name="settings_title">Ajustes</string>
<string name="manage_notifications">Gestionar notificaciones</string>
<string name="notifications_enabled_message">Las notificaciones están habilitadas. Las actualizaciones se mostrarán en la barra de estado mientras se ejecuta.</string>
<string name="notifications_disabled_message">Las notificaciones están deshabilitadas. Permita que vean el progreso cuando la aplicación está en segundo plano.</string>
<string name="open_notes">Abra el archivo de notas</string>
<string name="no_text_editor_error">No se encontró ningún editor de texto. Instale uno en Play Store.</string>
<string name="language_label">Idioma</string>
<string name="update_language_button">Idioma de actualización</string>
<string name="stop_on_duration_label">Parar después de la duración (segundos)</string>
<string name="duration_hint">0 (corre indefinidamente)</string>
<string name="links_header">Campo de golf</string>
<string name="website_button">Sitio web</string>
<string name="forum_button">Foro</string>
<string name="eula_button">Eula</string>
<string name="privacy_policy_button">política de privacidad</string>
<string name="multihasher_app_button">Aplicación multihasher</string>
<string name="back_button">Atrás</string>

    <!-- Voice Recording -->
<string name="record_voice_title">Registro de intención de voz</string>
<string name="record_voice_description">Incrustar la energía de su voz directamente en su intención. La grabación será hash y se agregará al texto. Max 60 segundos.</string>
<string name="record_status_idle">Toque micrófono para grabar</string>
<string name="record_status_recording">Grabación…</string>
<string name="record_status_playing">Jugando…</string>
<string name="record_status_paused">Detenido</string>
<string name="record_status_finished">Toque Play to Listen</string>
<string name="save_button">Ahorrar</string>
<string name="rerecord_button">Volver a grabar</string>
<string name="permission_required_title">Se requiere permiso</string>
<string name="mic_permission_description">Esta aplicación necesita acceso de micrófono para grabar su voz. Por favor, habilite en la configuración de su dispositivo.</string>
<string name="open_settings_button">Abrir configuración</string>
<string name="cancel_button">Cancelar</string>

    <!-- Frequency Options -->
<string name="freq_3_hz">3 Hz (clásico)</string>
<string name="freq_7_83_hz">7.83 Hz (resonancia de Schumann)</string>
<string name="freq_max">Máximo</string>
<string name="freq_hourly">Una vez por hora</string>

    <!-- Content Descriptions for Accessibility -->
<string name="cd_add_intention">Agregar nueva intención</string>
<string name="cd_delete_intention">Eliminar la intención actual</string>
<string name="cd_toggle_notification">Notificación de alternativa para esta intención</string>
<string name="cd_insert_file">Insertar el archivo hash en la intención</string>
<string name="cd_record_voice">Registre la voz de la voz en la intención</string>
<string name="cd_settings">Abrir configuración</string>
<string name="cd_scroll_tabs_left">Pestañas de desplazamiento a la izquierda</string>
<string name="cd_scroll_tabs_right">Pestañas de desplazamiento a la derecha</string>
<string name="cd_notification_active">La notificación está activa para esta intención</string>
<string name="cd_timer_running">El temporizador se está ejecutando para esta intención</string>

    <!-- Units -->
<string name="unit_hz">Hz</string>
<string name="unit_khz">khz</string>
<string name="unit_mhz">megahercio</string>
<string name="unit_ghz">GHz</string>
<string name="unit_thz">Thz</string>
<string name="unit_phz">Phz</string>
<string name="unit_ehz">EHZ</string>
<string name="unit_k">k</string>
<string name="unit_m">METRO</string>
<string name="unit_b">B</string>
<string name="unit_t">T</string>
<string name="unit_q">Q</string>
<string name="unit_Q">Q</string>
<string name="unit_s">s</string>
<string name="unit_S">S</string>
<string name="unit_per_hour">/hora</string>

    <!-- Notifications -->
<string name="notification_channel_name">Progreso de la intención</string>
<string name="notification_channel_description">Muestra el estado actual de la ejecución de intenciones.</string>
<string name="notification_title">El repetidor de la intención se está ejecutando</string>
</resources>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values-fr/strings.xml ---
--- CONTENT ---
<resources>
<string name="app_name">Répétiteur</string>
<string name="by_anthro_teacher">par Anthro professeur</string>
<string name="enter_intention_hint">Entrez votre intention ici…</string>
<string name="multiplier_label">Multiplier: %1$d</string>
<string name="frequency_label">Fréquence</string>
<string name="power_boost_label">Boost de puissance (SHA-512)</string>
<string name="keep_awake_label">Gardez l"appareil éveillé</string>
<string name="keep_awake_tooltip">Empêche l"appareil de dormir. Augmente l"utilisation de la batterie.</string>
<string name="start_button">COMMENCER</string>
<string name="stop_button">ARRÊT</string>
<string name="reset_button">RÉINITIALISER</string>
<string name="iterations_display">%1$s itérations (%2$s)</string>
<string name="iterations_display_initial">0 itérations (0 Hz)</string>
<string name="loading_intention">Intention de chargement…</string>
<string name="finished_status">Terminé:% 1 $ s</string>
<string name="version_display">Version 3.0</string>

    <!-- Settings Screen -->
<string name="settings_title">Paramètres</string>
<string name="manage_notifications">Gérer les notifications</string>
<string name="notifications_enabled_message">Les notifications sont activées. Les mises à jour s"afficheront dans la barre d"état lors de l"exécution.</string>
<string name="notifications_disabled_message">Les notifications sont désactivées. Leur permettez de voir les progrès lorsque l"application est en arrière-plan.</string>
<string name="open_notes">Fichier des notes ouvrir</string>
<string name="no_text_editor_error">Aucun éditeur de texte trouvé. Veuillez en installer un dans le Play Store.</string>
<string name="language_label">Langue</string>
<string name="update_language_button">Mettre à jour la langue</string>
<string name="stop_on_duration_label">Arrêtez-vous après durée (secondes)</string>
<string name="duration_hint">0 (fonctionne indéfiniment)</string>
<string name="links_header">Links</string>
<string name="website_button">Site web</string>
<string name="forum_button">Forum</string>
<string name="eula_button">Débattre</string>
<string name="privacy_policy_button">politique de confidentialité</string>
<string name="multihasher_app_button">Application multihasher</string>
<string name="back_button">Dos</string>

    <!-- Voice Recording -->
<string name="record_voice_title">Enregistrer l"intention vocale</string>
<string name="record_voice_description">Intégrez l"énergie de votre voix directement dans votre intention. L"enregistrement sera haché et annexé au texte. Max 60 secondes.</string>
<string name="record_status_idle">Appuyez sur micro pour enregistrer</string>
<string name="record_status_recording">Enregistrement…</string>
<string name="record_status_playing">Jouant…</string>
<string name="record_status_paused">Interrompu</string>
<string name="record_status_finished">Appuyez sur Play pour écouter</string>
<string name="save_button">Sauvegarder</string>
<string name="rerecord_button">Réenregistrer</string>
<string name="permission_required_title">Permission requise</string>
<string name="mic_permission_description">Cette application a besoin d"un accès au microphone pour enregistrer votre voix. Veuillez l"activer dans les paramètres de votre appareil.</string>
<string name="open_settings_button">Paramètres ouvrir</string>
<string name="cancel_button">Annuler</string>

    <!-- Frequency Options -->
<string name="freq_3_hz">3 Hz (classique)</string>
<string name="freq_7_83_hz">7.83 Hz (Schumann Resonance)</string>
<string name="freq_max">Maximum</string>
<string name="freq_hourly">Une fois par heure</string>

    <!-- Content Descriptions for Accessibility -->
<string name="cd_add_intention">Ajouter une nouvelle intention</string>
<string name="cd_delete_intention">Supprimer l"intention actuelle</string>
<string name="cd_toggle_notification">Basculer la notification pour cette intention</string>
<string name="cd_insert_file">Insérer le hachage du fichier dans l"intention</string>
<string name="cd_record_voice">Enregistrer le hachage de la voix dans l"intention</string>
<string name="cd_settings">Paramètres ouvrir</string>
<string name="cd_scroll_tabs_left">Faites défiler les onglets à gauche</string>
<string name="cd_scroll_tabs_right">Faites défiler les onglets à droite</string>
<string name="cd_notification_active">La notification est active pour cette intention</string>
<string name="cd_timer_running">La minuterie est en cours d"exécution pour cette intention</string>

    <!-- Units -->
<string name="unit_hz">HZ</string>
<string name="unit_khz">khz</string>
<string name="unit_mhz">MHz</string>
<string name="unit_ghz">Ghz</string>
<string name="unit_thz">Thz</string>
<string name="unit_phz">PHz</string>
<string name="unit_ehz">Ehz</string>
<string name="unit_k">k</string>
<string name="unit_m">M</string>
<string name="unit_b">B</string>
<string name="unit_t">T</string>
<string name="unit_q">q</string>
<string name="unit_Q">Q</string>
<string name="unit_s">s</string>
<string name="unit_S">S</string>
<string name="unit_per_hour">/heure</string>

    <!-- Notifications -->
<string name="notification_channel_name">Progrès de l"intention</string>
<string name="notification_channel_description">Affiche l"état actuel des intentions d"exécution.</string>
<string name="notification_title">Le répéteur de l"intention fonctionne</string>
</resources>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values-hi/strings.xml ---
--- CONTENT ---
<resources>
<string name="app_name">इरादा पुनरावर्तक</string>
<string name="by_anthro_teacher">एंथ्रो शिक्षक द्वारा</string>
<string name="enter_intention_hint">अपना इरादा यहाँ दर्ज करें ...</string>
<string name="multiplier_label">गुणा: %$ 1 डी</string>
<string name="frequency_label">आवृत्ति</string>
<string name="power_boost_label">पावर बूस्ट (SHA-512)</string>
<string name="keep_awake_label">डिवाइस जागते रहें</string>
<string name="keep_awake_tooltip">डिवाइस को सोने से रोकता है। बैटरी का उपयोग बढ़ाता है।</string>
<string name="start_button">शुरू</string>
<string name="stop_button">रुकना</string>
<string name="reset_button">रीसेट करना</string>
<string name="iterations_display">%1$s iterations (%2$s)</string>
<string name="iterations_display_initial">0 पुनरावृत्तियों (0 हर्ट्ज)</string>
<string name="loading_intention">लोड हो रहा है ...</string>
<string name="finished_status">समाप्त: %1 $ s</string>
<string name="version_display">संस्करण 3.0</string>

    <!-- Settings Screen -->
<string name="settings_title">सेटिंग</string>
<string name="manage_notifications">सूचनाओं का प्रबंधन करें</string>
<string name="notifications_enabled_message">सूचनाएं सक्षम हैं। चलते समय स्थिति बार में अपडेट दिखाई देंगे।</string>
<string name="notifications_disabled_message">सूचनाएं अक्षम हैं। जब ऐप बैकग्राउंड में होता है तो उन्हें प्रगति देखने में सक्षम करें।</string>
<string name="open_notes">खुले नोट्स फ़ाइल</string>
<string name="no_text_editor_error">कोई पाठ संपादक नहीं मिला। कृपया प्ले स्टोर से एक स्थापित करें।</string>
<string name="language_label">भाषा</string>
<string name="update_language_button">अद्यतन भाषा</string>
<string name="stop_on_duration_label">अवधि के बाद बंद करो (सेकंड)</string>
<string name="duration_hint">0 (अनिश्चित काल तक चलता है)</string>
<string name="links_header">लिंक</string>
<string name="website_button">वेबसाइट</string>
<string name="forum_button">मंच</string>
<string name="eula_button">यूला</string>
<string name="privacy_policy_button">गोपनीयता नीति</string>
<string name="multihasher_app_button">बहुहाशर ऐप</string>
<string name="back_button">पीछे</string>

    <!-- Voice Recording -->
<string name="record_voice_title">रिकॉर्ड आवाज का इरादा</string>
<string name="record_voice_description">अपनी आवाज की ऊर्जा को सीधे अपने इरादे में एम्बेड करें। रिकॉर्डिंग को हैशेड और पाठ में जोड़ा जाएगा। अधिकतम 60 सेकंड।</string>
<string name="record_status_idle">रिकॉर्ड करने के लिए माइक को टैप करें</string>
<string name="record_status_recording">रिकॉर्डिंग…</string>
<string name="record_status_playing">खेलना…</string>
<string name="record_status_paused">रोका हुआ</string>
<string name="record_status_finished">सुनने के लिए खेलने के लिए टैप करें</string>
<string name="save_button">बचाना</string>
<string name="rerecord_button">पुन: रिकॉर्ड</string>
<string name="permission_required_title">अनुमति आवश्यक है</string>
<string name="mic_permission_description">इस ऐप को आपकी आवाज रिकॉर्ड करने के लिए माइक्रोफोन एक्सेस की आवश्यकता है। कृपया इसे अपनी डिवाइस सेटिंग्स में सक्षम करें।</string>
<string name="open_settings_button">खुली सेटिंग</string>
<string name="cancel_button">रद्द करना</string>

    <!-- Frequency Options -->
<string name="freq_3_hz">3 हर्ट्ज (क्लासिक)</string>
<string name="freq_7_83_hz">7.83 हर्ट्ज (शुमान रेजोनेंस)</string>
<string name="freq_max">अधिकतम</string>
<string name="freq_hourly">एक बार प्रति घंटे</string>

    <!-- Content Descriptions for Accessibility -->
<string name="cd_add_intention">नया इरादा जोड़ें</string>
<string name="cd_delete_intention">वर्तमान इरादे को हटा दें</string>
<string name="cd_toggle_notification">इस इरादे के लिए टॉगल अधिसूचना</string>
<string name="cd_insert_file">इरादा में फ़ाइल हैश डालें</string>
<string name="cd_record_voice">इरादा में आवाज हैश रिकॉर्ड करें</string>
<string name="cd_settings">खुली सेटिंग</string>
<string name="cd_scroll_tabs_left">स्क्रॉल टैब छोड़ दिया</string>
<string name="cd_scroll_tabs_right">स्क्रॉल टैब सही</string>
<string name="cd_notification_active">अधिसूचना इस इरादे के लिए सक्रिय है</string>
<string name="cd_timer_running">इस इरादे के लिए टाइमर चल रहा है</string>

    <!-- Units -->
<string name="unit_hz">हर्ट्ज</string>
<string name="unit_khz">kHz</string>
<string name="unit_mhz">मेगाहर्टज</string>
<string name="unit_ghz">गीगा</string>
<string name="unit_thz">टोंड</string>
<string name="unit_phz">आंदोलन</string>
<string name="unit_ehz">ईएचजेड</string>
<string name="unit_k">k</string>
<string name="unit_m">एम</string>
<string name="unit_b">बी</string>
<string name="unit_t">टी</string>
<string name="unit_q">क्यू</string>
<string name="unit_Q">क्यू</string>
<string name="unit_s">एस</string>
<string name="unit_S">एस</string>
<string name="unit_per_hour">/hr</string>

    <!-- Notifications -->
<string name="notification_channel_name">इरादा प्रगति</string>
<string name="notification_channel_description">चलाने के इरादे की वर्तमान स्थिति दिखाता है।</string>
<string name="notification_title">इरादा पुनरावर्तक चल रहा है</string>
</resources>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/values-ja/strings.xml ---
--- CONTENT ---
<resources>
<string name="app_name">意図リピーター</string>
<string name="by_anthro_teacher">Anthroの先生によって</string>
<string name="enter_intention_hint">ここにあなたの意図を入力してください…</string>
<string name="multiplier_label">乗算：％$ 1 d</string>
<string name="frequency_label">頻度</string>
<string name="power_boost_label">パワーブースト（SHA-512）</string>
<string name="keep_awake_label">デバイスを目覚めさせてください</string>
<string name="keep_awake_tooltip">デバイスが寝るのを防ぎます。バッテリーの使用量が増加します。</string>
<string name="start_button">始める</string>
<string name="stop_button">停止</string>
<string name="reset_button">リセット</string>
<string name="iterations_display">％1 $ s反復（％2 $ s）</string>
<string name="iterations_display_initial">0イテレーション（0 Hz）</string>
<string name="loading_intention">積み込み意図…</string>
<string name="finished_status">終了：％1 $ s</string>
<string name="version_display">バージョン3.0</string>

    <!-- Settings Screen -->
<string name="settings_title">設定</string>
<string name="manage_notifications">通知を管理します</string>
<string name="notifications_enabled_message">通知が有効になっています。更新は、実行中にステータスバーに表示されます。</string>
<string name="notifications_disabled_message">通知は無効です。アプリがバックグラウンドにあるときに進行状況を確認できるようにします。</string>
<string name="open_notes">オープンノートファイル</string>
<string name="no_text_editor_error">テキストエディターは見つかりませんでした。プレイストアからインストールしてください。</string>
<string name="language_label">言語</string>
<string name="update_language_button">言語を更新します</string>
<string name="stop_on_duration_label">期間後（秒）停止</string>
<string name="duration_hint">0（無期限に実行）</string>
<string name="links_header">リンク</string>
<string name="website_button">Webサイト</string>
<string name="forum_button">フォーラム</string>
<string name="eula_button">ユーラ</string>
<string name="privacy_policy_button">プライバシーポリシー</string>
<string name="multihasher_app_button">Multihasherアプリ</string>
<string name="back_button">戻る</string>

    <!-- Voice Recording -->
<string name="record_voice_title">声の意図を記録します</string>
<string name="record_voice_description">あなたの声のエネルギーをあなたの意図に直接埋め込みました。録音はハッシュされ、テキストに追加されます。最大60秒。</string>
<string name="record_status_idle">マイクをタップして記録します</string>
<string name="record_status_recording">録音…</string>
<string name="record_status_playing">遊び…</string>
<string name="record_status_paused">一時停止</string>
<string name="record_status_finished">プレイをタップして聞いてください</string>
<string name="save_button">保存</string>
<string name="rerecord_button">再録音</string>
<string name="permission_required_title">許可が必要です</string>
<string name="mic_permission_description">このアプリは、音声を記録するためにマイクにアクセスする必要があります。デバイスの設定で有効にしてください。</string>
<string name="open_settings_button">設定を開く</string>
<string name="cancel_button">キャンセル</string>

    <!-- Frequency Options -->
<string name="freq_3_hz">3 Hz（クラシック）</string>
<string name="freq_7_83_hz">7.83 Hz（シューマン共鳴）</string>
<string name="freq_max">最大</string>
<string name="freq_hourly">1時間に1回</string>

    <!-- Content Descriptions for Accessibility -->
<string name="cd_add_intention">新しい意図を追加します</string>
<string name="cd_delete_intention">現在の意図を削除します</string>
<string name="cd_toggle_notification">この意図の通知を切り替えます</string>
<string name="cd_insert_file">ファイルハッシュを意図に挿入します</string>
<string name="cd_record_voice">声のハッシュを意図に記録します</string>
<string name="cd_settings">設定を開く</string>
<string name="cd_scroll_tabs_left">左のタブをスクロールします</string>
<string name="cd_scroll_tabs_right">タブを右にスクロールします</string>
<string name="cd_notification_active">この意図のために通知はアクティブです</string>
<string name="cd_timer_running">この意図のためにタイマーが実行されています</string>

    <!-- Units -->
<string name="unit_hz">Hz</string>
<string name="unit_khz">KHZ</string>
<string name="unit_mhz">MHz</string>
<string name="unit_ghz">GHz</string>
<string name="unit_thz">thz</string>
<string name="unit_phz">PHZ</string>
<string name="unit_ehz">EHZ</string>
<string name="unit_k">k</string>
<string name="unit_m">m</string>
<string name="unit_b">b</string>
<string name="unit_t">t</string>
<string name="unit_q">Q</string>
<string name="unit_Q">Q</string>
<string name="unit_s">s</string>
<string name="unit_S">s</string>
<string name="unit_per_hour">/HR</string>

    <!-- Notifications -->
<string name="notification_channel_name">意図の進行</string>
<string name="notification_channel_description">実行意図の現在のステータスを示しています。</string>
<string name="notification_title">意図リピーターが走っています</string>
</resources>

--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/xml/backup_rules.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <!-- Remove the following backup rules if you want to enable Google Drive backup.
         It's recommended to disable backup for this app to avoid restoring old
         or corrupted state. -->
    <exclude domain="database" path="intention_database.db" />
    <exclude domain="sharedpref" path="AppPreferences.xml" />
</full-backup-content>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/xml/data_extraction_rules.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
    <cloud-backup>
        <exclude domain="database" />
        <exclude domain="sharedpref" />
    </cloud-backup>
    <device-transfer>
        <exclude domain="database" />
        <exclude domain="sharedpref" />
    </device-transfer>
</data-extraction-rules>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/xml/file_paths.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<paths>
    <files-path name="internal_files" path="." />
    <cache-path name="cache" path="." />
</paths>
--- END CONTENT ---
--- END FILE ---

--- FILE: app/src/main/res/xml/locales_config.xml ---
--- CONTENT ---
<?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
    <locale android:name="en"/>
    <locale android:name="es"/>
    <locale android:name="fr"/>
    <locale android:name="de"/>
    <locale android:name="ja"/>
    <locale android:name="hi"/>
</locale-config>
--- END CONTENT ---
--- END FILE ---

--- FILE: gradle/libs.versions.toml ---
--- CONTENT ---
[versions]
androidApplication = "8.4.1"
jetbrainsKotlinAndroid = "1.9.22"
ksp = "1.9.22-1.0.17"

coreKtx = "1.13.1"
lifecycleRuntimeKtx = "2.8.0"
activityCompose = "1.9.0"
composeBom = "2024.04.01"
lifecycleViewmodelCompose = "2.8.0"
lifecycleRuntimeCompose = "2.8.0"
room = "2.6.1"
bouncycastle = "1.70"

junit = "4.13.2"
androidxTestExtJunit = "1.1.5"
espressoCore = "3.5.1"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "lifecycleRuntimeCompose" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended" }
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
androidx-room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
androidx-room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
androidx-room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
bouncycastle-provider = { group = "org.bouncycastle", name = "bcprov-jdk15on", version.ref = "bouncycastle" }

junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxTestExtJunit" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "androidApplication" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "jetbrainsKotlinAndroid" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }

--- END CONTENT ---
--- END FILE ---

--- FILE: gradle/wrapper/gradle-wrapper.properties ---
--- CONTENT ---
#Thu Oct 02 11:57:22 UTC 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

--- END CONTENT ---
--- END FILE ---

